<div class="container">
<div class="row">	
	<div class="ui-contain col-sm-8">
	<portlet return="array" return_var="wxes"  cache="900"  showpages="0" model="Wx" info="joins[0][table]=tag_relateds&joins[0][alias]=TagRelated&joins[0][type]=inner&joins[0][conditions]=Wx.id=TagRelated.relatedid&conditions[tag_id]=$id&conditions[relatedmodel]=Wx"></portlet>
		<?PHP foreach($wxes['datalist'] as $wx) {$wx_ids = $wx['Wx']['id'];};?>
		
		<portlet  title="{{$tag['name']}}文章列表" list_tpl="inner" page_name="ap" limit="50" showpages="1"  model="Article" recursive="-1" order="created desc" info="showpages=1&recursive=-1&conditions[Article.wx_id]=$wx_ids">
	<div class="regionlist">
		<h3>{{eval 
		echo $this->Html->link(usubstr($item['name'],0,35), 
				'/'.$region_control_name.'/'.date('Ymd',strtotime($item['created'])).'/'.($item['slug']?$item['slug']:$item['id']).'.html', 
				array('title'=>$item['name'],'target'=>'_blank','escape'=>false)
			);
		}}</h3>
		<div class="listsummary" >
			<div style="float:right;margin:2px 5px 2px 15px;">
			<?PHP 
				if($item['coverimg']){
					echo $this->Html->image("grey.gif", array('title'=>$item['name'],'class'=>'lazy','style'=>'height:90px;min-width:60px;max-width:150px','data-src'=>$item['coverimg'],));
				}
			?>
			</div>
			<div>{{$item['summary']}}</div>
			<div class="listauthor">
				<span>来源:<a href="{{$this->Html->url('/wxes/'.$item['wx_id'])}}">{{$item_all['Wx']['name']}}</a></span>
				<span>发布于{{$item['created']}} |  <span class="ui-stats-num" id="Stats-Article-{{$item['id']}}-view_nums">{{$item['view_nums']}}</span> 次阅读</span></div>
		</div>
	</div>
		</portlet>
	</div>
<style>
.wx-name{font-size:12px;margin:5px 0;height:32px;overflow:hidden;line-height:16px;}
</style>
	<div class="ui-contain col-sm-4">
		<portlet title="{{$tag['name']}}">
		<?PHP if($total>0){ ?> 
			<div class="row">
			<?PHP
			 foreach($datalist as $item) {
				$item = $item[$target_model];
				$item['slug'] = $item['slug']?$item['slug']:$item['id'];
			?>	 		
					<div class="col-md-3">
						<div>
					{{$this->Html->image($item['coverimg'], 
						array(
						'alt' => $item['name'],'title' => $item['name'],
						'class'=>'img-circle img-responsive',
						'url'=> '/'.$target_controller.'/'.$item['slug'].'.html' 
						))}}
					</div>
					<p class="wx-name text-center" style="margin-top:2px;text-align:center;">
						{{$this->Html->link(usubstr($item['name'],0,10), 
						'/'.$target_controller.'/'.$item['slug'].'.html',
						array('title'=>$item['name']))}}
					</p>
					</div>
			<?php } ?>
			</ul> 	
			{{$page_navi}}
		
		<?php } ?>
		</portlet>

		<portlet  title="分类标签" list_tpl="inner" limit="100" model="Tag" recursive="-1" order="priority desc" info="conditions[cate_id %3C]=214&conditions[cate_id %3E]=172&recursive=-1&fields[0]=Tag.name&fields[2]=Tag.created&fields[3]=Tag.id&order=priority desc">
				<a href="{{$this->Html->url('/tags/lists/Wx/'.$item['id'])}}">{{$item['name']}}</a>&nbsp;&nbsp;
		</portlet>

		<portlet  title="最新文章" list_tpl="regions/_titlelist" limit="8" custom_class="portlet-title-list" model="Article" recursive="-1" order="created desc" info="recursive=-1&fields[0]=Article.name&fields[1]=Article.slug&fields[2]=Article.created&fields[3]=Article.id&order=created desc"></portlet>
	</div>
</div>
</div>
